[Unit]
Description=Buildbot worker
Wants=network.target
After=network.target

[Service]
Type=forking
PIDFile=/home/{{ buildbot_worker_user }}/{{ buildbot_worker_name }}/twistd.pid
WorkingDirectory=/home/{{ buildbot_worker_user }}
ExecStart=/usr/local/bin/buildbot-worker start {{ buildbot_worker_name }}
ExecReload=/usr/local/bin/buildbot-worker restart {{ buildbot_worker_name }}
ExecStop=/usr/local/bin/buildbot-worker stop {{ buildbot_worker_name }}
Restart=always
User={{ buildbot_worker_user }}

[Install]
WantedBy=multi-user.target
